import React from 'react'
import Login from './Login'
import Admin from './Admin'
import { Switch, Route, Redirect } from 'react-router-dom'
import { store } from './store/index'
import { Provider } from 'react-redux'
import yztoken from './utils/yztoken'
 function App() {
  return (<Provider store={store}>
    <div>
      <Switch>
        <Route path="/login" component={Login} />
        <Route path="/admin" component={Admin} />
        <Redirect from="/" to="/admin" />
      </Switch>
    </div>
  </Provider>
  )
}
export default yztoken(App)